<script
	src="<?= base_url(); ?>application/third_party/ckeditor/ckeditor.js"></script>

<section class="wrapper">


	<div class="col-lg-12">
		<!--work progress start-->
		<section class="panel">
			<div class="inbox-head">
				<h3>EMAIL TEMPLATE MANAGEMENT</h3>
			</div>
			<div class="panel-body">
				<form class="form-horizontal" role="form" name="cat" method="POST"
					action="<?= base_url(); ?>secure/template/email_template/get_tempalate">

					<?php if($this->session->flashdata('message'))
					{
						$msg=$this->session->flashdata('message');
						echo '<font color="red">'.$msg.'</font>';
					}
					?>
					<div class="form-group">
						<label for="input" class="col-lg-2 control-label">Template Type</label>
						<div class="col-lg-3">
							<select class="form-control" name="email_tempalte"
								onchange="this.form.submit()">
								<option selected="selected" value="">- - - Select Template- - -</option>
								<?php foreach ($emailtemp as $emailtemp): ?>
								<option value="<?= $emailtemp->id; ?>">
									<?= $emailtemp->title; ?>
								</option>
								<?php endforeach; ?>
							</select>
						</div>
					</div>


				</form>
			</div>

			<?php if (isset($row['info']->id)) { ?>
			<div class="inbox-head">
				<h3>
					EMAIL TEMPLATE MANAGEMENT :
					<?= $row['info']->title; ?>
				</h3>

			</div>

			<div class="panel-body">
				<form class="form-horizontal" role="form" name="keyword"
					method="POST"
					action="<?= base_url(); ?>secure/template/email_template/update_template">
					<?php
					if ($this->session->flashdata('message')) {
						$msg = $this->session->flashdata('message');
						echo '<font color="red">' . $msg . '</font>';
					}
					?>

					<div class="form-group">
						<label for="input" class="col-lg-2 control-label"><h3>Template</h3>
						</label>
						<div class="col-lg-8"></div>
					</div>
					<div class="form-group">
						<div class="col-lg-12">

							<textarea class="form-control ckeditor" id="summernote"
								name="temp_detail" rows="6">
									<?= $row['info']->description; ?>
									</textarea>

							<input name="template_status" type="radio" value="1"
							<?php if ($row['info']->status == '1')
								echo 'checked=cheked' ?> />Inactive <input
								name="template_status" type="radio" value="51"
								<?php if ($row['info']->status == '51')
									echo 'checked=cheked' ?> /> Active <label>&nbsp;</label>
						</div>

					</div>

					<div class="form-group">
						<div class="col-lg-12">
							<input type="hidden" name="temp_id"
								value="<?= $row['info']->id; ?>" /> <input type="submit"
								class="pull-right btn btn-info" name="update_template"
								<?php if($this->config->item('mode')=='DEMO'){?>
								onclick="alert ('Sorry! Not allowed in demo mode '); return false;"
								<?} else?> onclick="return confirm('Are you sure ?');"
								value="Update"
								onclick="nicEditors.findEditor('cmscontent').saveContent();return confirm('Are you sure you want to update?');" />
						</div>
					</div>


				</form>
			</div>
			<?php }?>

			<!-- End of Body Panel -->
		</section>
		<!-- page end-->
	</div>
</section>















